<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>添加物流</title>
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<style>
		body{    background: #Fff;}  .form>form>div label{width:77px;text-align: right;display: inline-block;} .form>form>div label.error{width:auto;margin-left: 63px;}.form>form.block-form>div{margin-top:20px;}
		</style>
	</head>

	<body>
		<div class="form" style="padding:20px 40px;">
			<input type="hidden" value="" name="id" id="aid"/>
			<form class="block-form" id="commentForm">
				<div  class="over-hidden" style="margin-top:0px;">
					<label class="fl"><span class="red">*</span>物流公司：</label>
					<input type="text" class="pro_name fl" placeholder="请输入物流公司" name="company" id="company" />
				</div>
				<div class="over-hidden">
					<label class="fl"><span class="red ">*</span>物流电话：</label>
					<input type="text" class="pro_name fl" placeholder="请输入物流电话" name="tel" id="tel" />
				</div>
				<div class="over-hidden">
					<label class="fl"><span class="red hidden">*</span>物流编码：</label>
					<input type="text" class="pro_name fl" placeholder="请输入物流编码" name="code" id="code" />
				</div>
				<div class="text-center" style="margin-top:30px;">
					<input type="submit" value="保存" class="search-input-button bgblue" id="subButton" style="margin-right:120px;"/>
				    <input type="button" value="返回" class="search-input-button " id="backButton" />
				</div>
			</form>
		</div>
 

		<script src="js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
	    <script src="js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/messages_zh.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
		
		$.validator.setDefaults({
			submitHandler: function() {
				//这里放验证成功之后要执行的函数
				
			}
		});
 
		$(document).ready(function() {
			$("#commentForm").validate({
				rules: {
					company: {
						required: true,
					},
					tel: {
						required: true,
					},
				},
				messages: {
					company: {
						required: "<i class=\" icon icon_error_red \"></i>请输入物流公司",
					},
					
					tel: {
						required: "<i class=\" icon icon_error_red \"></i>请输入物流电话",
					},
				},
				errorPlacement: function(error, element) {
					error.appendTo('<i class=\" icon icon_error_red \"></i>').appendTo(element.parent());
				},
			});
		});
	 
		</script>

	</body>

</html>